<table class="table table-striped table-bordered">
	<tr>
		<th>Post Title</th>
		<th>Author</th>
		<th>Category</th>
		<th>Published At</th>
		<th width="15%">Actions</th>
	</tr>	
	<?php foreach($all_post as $all_post_rec): ?>
		<tr>
			<td><?php echo $all_post_rec['jonu_post_title'] ?></td>
			<td><?php echo $all_post_rec['jonu_user_fullname'] ?></td>
			<?php  
			$this->db->join('jonu_post', 'jonu_pc.jonu_post_id = jonu_post.jonu_post_id');
			$this->db->join('jonu_category', 'jonu_pc.jonu_category_id = jonu_category.jonu_category_id');
			$this->db->where('jonu_pc.jonu_post_id', $all_post_rec['jonu_post_id']);
			$query = $this->db->get('jonu_pc');
			$result = $query->result_array();
			?>
			<td>
				<?php foreach($result as $cat_rec): ?>
					<?php echo "<span class='cat-post-items'>".$cat_rec['jonu_category_alias']."</span>, " ?>
				<?php endforeach; ?>
			</td>
			<td><?php echo $all_post_rec['jonu_post_date'] ?></td>
			<td align="center">
				<form class="frm-act" action="<?php echo site_url("mimin_jonu/approve_post/$all_post_rec[jonu_post_id]") ?>" method="post">
					<button name="adm_approve_post" type="submit" class="act-publish" value="approve"><i class="fa fa-check"></i></button>
				</form>
				<form class="frm-act" action="<?php echo site_url("mimin_jonu/edit_post/$all_post_rec[jonu_post_id]") ?>" method="post">
					<button name="adm_edit_post" type="submit" class="act-edit" value="edit"><i class="fa fa-pencil"></i></button>
				</form>
				<form class="frm-act" action="<?php echo site_url("mimin_jonu/delete_post/$all_post_rec[jonu_post_id]") ?>" method="post">
					<button name="adm_delete_post" type="submit" class="act-delete"><i class="fa fa-trash"></i></button>
				</form>			
			</td>
		</tr>
	<?php endforeach; ?>
	<?php if(count($all_post) == 0): ?>
		<tr><td colspan="5" align="center">No data for blocked post</td></tr>
	<?php endif; ?>
</table>
